[PR]

水無瀬の部屋 > Programming > sample > tools > header > ptrlist.h
最終更新日: 2007/10/24

   1: //*********************************************************
   2: // プロジェクト: TOOLS
   3: //   ファイル名: ptrlist.h
   4: //*********************************************************
   5: #ifndef PTRLIST_HEAD_INCLUDED
   6: #define PTRLIST_HEAD_INCLUDED
   7: 
   8: 
   9: //*********************************************************
  10: // コンパイル環境の指定
  11: //*********************************************************
  12: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // 冗長ガード
  13: #include <header/_tools.h>
  14: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // ガード名の検査
  15: #error "? PRIVATE_TOOLS_HEAD_INCLUDED"
  16: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
  17: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
  18: 
  19: 
  20: //*********************************************************
  21: // 構造体 の 宣言
  22: //*********************************************************
  23: typedef struct ptrlist_tag ptrlist_t; // リスト // *HPTRLIST;
  24: typedef struct ptritem_tag ptritem_t; // 反復子 // *HPTRITEM;
  25: 
  26: //
  27: typedef int  (CALLBACK *PTRLISTREMOVEITEMPROC_t)( void *ptr, int index, const void *param );
  28: typedef int  (CALLBACK *PTRLISTCOMPAREITEMPROC_t)( const void *p, const void *q, const void *param );
  29: typedef bool (CALLBACK *EMPTYPTRLISTPROC_t)( void *ptr, int index, const void *param );
  30: typedef bool (CALLBACK *FINDPTRLISTITEMPROC_t)( const void *ptr, int index, const void *param );
  31: 
  32: 
  33: //*********************************************************
  34: // 関数 の 宣言
  35: //*********************************************************
  36: #ifdef __cplusplus
  37: extern "C" {
  38: #endif
  39: 
  40: 
  41: // ptrlist.cpp
  42: ptrlist_t *CreatePtrList( void );
  43: bool       DestroyPtrList( ptrlist_t *list );
  44: bool       PtrList_Foreach( const ptrlist_t *list, bool (*proc)( void *, void *), void *param );
  45: bool       IsValidPtrListHandle( const ptrlist_t *list );
  46: bool       PtrList_IsEmpty( const ptrlist_t *list );
  47: bool       PtrList_IsValidIndex( const ptrlist_t *list, int index );
  48: int        PtrList_GetItemCount( const ptrlist_t *list );
  49: void      *PtrList_GetItemPtr( const ptrlist_t *list, int index );
  50: int        PtrList_AddItemTop( ptrlist_t *list, const void *ptr );
  51: int        PtrList_AddItemBottom( ptrlist_t *list, const void *ptr );
  52: int        PtrList_InsertItemNext( ptrlist_t *list, ptritem_t *item, const void *ptr );
  53: bool       EmptyPtrList( ptrlist_t *list, EMPTYPTRLISTPROC_t proc, const void *param );
  54: void      *PtrList_FindItemPtr( const ptrlist_t *list, bool bTopdown, FINDPTRLISTITEMPROC_t proc, const void *param );
  55: void      *PtrList_RemoveItemIt( ptrlist_t *list, ptritem_t *item );
  56: int        PtrList_RemoveItem( ptrlist_t *list, bool bTopdown, PTRLISTREMOVEITEMPROC_t proc, const void *param );
  57: bool       PtrList_InsertSort( ptrlist_t *list, PTRLISTCOMPAREITEMPROC_t proc, const void *param );
  58: bool       PtrList_IsSorted( const ptrlist_t *list, PTRLISTCOMPAREITEMPROC_t proc, const void *param );
  59: //
  60: ptritem_t *PtrList_GetBegin( const ptrlist_t *list, bool bTopdown );
  61: ptritem_t *PtrItem_GetNext( const ptritem_t *item, bool bTopdown );
  62: void      *PtrItem_GetPtr( const ptritem_t *item );
  63: bool       IsValidPtrItemHandle( const ptritem_t *item );
  64: 
  65: 
  66: #ifdef __cplusplus
  67: } // extern "C"
  68: #endif
  69: 
  70: 
  71: #endif // #ifndef PTRLIST_HEAD_INCLUDED
  72: 
  73: 
  74: //** end **

参照: tools.h


Google
ご意見・ご感想をお聞かせ下さい。匿名で送信できます。

 * 返信が必要な場合には postmaster@katsura-kotonoha.sakura.ne.jp へ直接メールしてください。

水無瀬の部屋 > sample > tools > header > ptrlist.h

このページは cpp2web が出力しました。
水無瀬 優 postmaster@katsura-kotonoha.sakura.ne.jp
http://katsura-kotonoha.sakura.ne.jp/prog/code/tools/header/ptrlist_h.shtml
>> Amazon.co.jp 『たまゆら童子』 へ
>> 楽天ブックス 『たまゆら童子』 へ